
def cache_deco(func):
    cache = {}
    def wrapper(args):
        if args in cache:
            return cache[args]
        else:
            result = func(args)
            cache[args] = result
            return result
    return wrapper


@cache_deco
def fibo(n):
    print("called")
    if n < 2:
        return n
    return fibo(n-1) + fibo(n-2)


if __name__ == '__main__':
    fibo(10)
